<?
define('IN_SITE', true);
include("common.php");

$uID= isset($_GET["id"]) ? htmlspecialchars($_GET["id"]) : '';
$scipt='<script language="javascript">';

if(!empty($uID)){
 $sql="select mEmail from vb_member where mEmail='".$uID."'";
 	if(!$result=$db->sql_query($sql)){
	  message_die("Couldn't run the sql query!!!","",__LINE__,__FILE__,$sql);
	}
	$cat_count1=$db->sql_numrows($result);	
	$db->sql_freeresult($result);
 	if($cat_count1>0){
		$scipt.='
		   var idinfo= parent.document.getElementById("id_email");
		    idinfo.innerHTML = "Your email address has already been registered."
			idinfo.className = "quote"		 
		';	 //window.opener.addOption(result.options[j].innerHTML,result.options[j].value);
	}else{
	$scipt.='
	        var idinfo= parent.document.getElementById("id_email")
		    idinfo.innerHTML = " OK "
			idinfo.className = "style9"		
	';
	}
	$scipt.='</script>';
	echo $scipt;
}
?>